package cn.haocxy.jfm.gui;

import javafx.scene.Scene;
import cn.haocxy.jfm.file.FilePath;
import cn.haocxy.jfm.filelist.FileList;

public class JfmScene {

	private final Scene scene;
	
	private final JfmPane jfmPane;
	
	public JfmScene(FileList model) {
		jfmPane = new JfmPane(model);
		scene = new Scene(jfmPane.toNode());
	}
	
	public JfmScene(FilePath path) {
		jfmPane = new JfmPane(path);
		scene = new Scene(jfmPane.toNode());
	}
	
	public JfmScene(String path) {
		jfmPane = new JfmPane(path);
		scene = new Scene(jfmPane.toNode());
	}
	
	public void onShowing() {
		jfmPane.onShowing();
	}
	
	public Scene toScene() {
		return scene;
	}
}
